package com.hyper_yang._03_designpatterns.principles.demo4.next;

// 单一职责原则: 【每个类只负责自己的事情，而不是变成万能的】
public class Test {
    public static void main(String[] args) {
        Document doc = new Document("单一职责原则示例文档");
        DocumentSaver saver = new DocumentSaver();
        DocumentPrinter printer = new DocumentPrinter();
        saver.save(doc);
        printer.print(doc);
    }
}
